package com.tuo51.childcare.domain.dailyrecord;

import com.tuo51.foudation.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 每日观察记录
 */
@Entity
@Table(name = "user_daily_observer")
@EqualsAndHashCode(callSuper = true)
@Data
public class DailyGrowRecord extends Domain {

    @Column(columnDefinition = "varchar(32) COMMENT '用户id'")
    private String uid;

    @Column(columnDefinition = "varchar(32) COMMENT '孩子id'")
    private String childrenId;

    @Column(columnDefinition = "varchar(256) COMMENT 'day'", nullable = false)
    private String day;

    @Column(columnDefinition = "varchar(256) COMMENT '字段名'", nullable = false)
    private String title;

    @Column(columnDefinition = "varchar(256) COMMENT '值'", nullable = false)
    private String value;

    @Column(columnDefinition = "int default 0 COMMENT '序号'", nullable = false)
    private Integer dailyIndex = 0;

    @Column(columnDefinition = "varchar(32) COMMENT '模板条目id'", nullable = false)
    private String templateId;
}
